/*
 * @Author: 刘晟勇
 * @Date: 2021-10-14 17:12:46
 * @LastEditTime: 2021-10-19 15:59:09
 * @Description: 请求配置
 */

// 导入 Toast轻提示
import { Toast } from 'vant'
// 导入axios
import axios from "axios";

// axios的公用路径
axios.defaults.baseURL = 'http://www.520gongfu.com:9527/api/'
// 对响应的数据进行统一处理
axios.interceptors.response.use(response => {
    const {
      data
    } = response
    if (data.status == 0) {
      return data
    } else {
      Toast.fail(data.msg)
    }
})

export default axios